package org.example;

public class TopManager extends FixedSalaryEmployee {
    private double successIncomeLevel = 10000000;
    private double bonus = 150;   // % of salary

    public TopManager(Company company, double fixedSalary) {
        super(company, fixedSalary);
    }

    @Override
    public double getMonthSalary() {
        return super.getMonthSalary() +
                (company.getIncome() > successIncomeLevel ? super.getMonthSalary() * bonus / 100 : 0);
    }
}
